package com.example.demo.service.impl;

import com.example.demo.dao.RecreationDao;
import com.example.demo.entity.Recreation;
import com.example.demo.service.RecreationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
@Component
public class RecreationServiceImpl implements RecreationService {
    @Autowired
    private RecreationDao recreationDao;
    @Override
    public List<Recreation> getAll() {

        return recreationDao.getAll();
    }

    @Override
    public int addRecreation(Recreation recreation) {

        return recreationDao.addRecreation(recreation);
    }

    @Override
    public int update(Recreation recreation) {
        return recreationDao.update(recreation);
    }

    @Override
    public int delete(Integer rid) {
        return recreationDao.delete(rid);
    }
}